﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>某某家具设计公司企业官网-模板之家</title>
    ﻿<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="format-detection" content="telephone=no">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="alternate icon" type="image/png" href="images/favicon.png">
<link rel='icon' href='favicon.ico' type='image/x-ico' />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="stylesheet" href="css/default.min.css?t=227" />
<!--[if (gte IE 9)|!(IE)]><!-->
<script type="text/javascript" src="lib/jquery/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="lib/amazeui/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script type="text/javascript" src="lib/handlebars/handlebars.min.js"></script>
<script type="text/javascript" src="lib/iscroll/iscroll-probe.js"></script>
<script type="text/javascript" src="lib/amazeui/amazeui.min.js"></script>
<script type="text/javascript" src="lib/raty/jquery.raty.js"></script>
<script type="text/javascript" src="js/main.min.js?t=1"></script>
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>
<section class="pro-list">
    <aside class="pro-leftsidebar">
        <ul>
            <li>
                <a>产品搜索</a>
                <ul id="pro-search">
                    <li>
                    
                    <form action="ProductServlet?reqName=productSelect&id=0&pageNo=1" method="post" >
                        <input type="text" name="name"  class="pro-search">
                        <button type="submit">提交</button>
                    </form>
                    </li>
                </ul>
            </li>
            <li>
                <a>产品分类</a>
                <ul id="pro-category">
                <c:choose>
                <c:when test="${empty productClass }"></c:when>
                <c:otherwise>
                    <c:forEach items="${productClass }" var="u">
                    <c:if test="${u.id==id }">
                    <li class="on"><a href="ProductServlet?reqName=productSelect&id=${u.id }&pageNo=1">${u.kind }</a></li>
                    </c:if>
                    <c:if test="${u.id!=id }">
                    <li><a href="ProductServlet?reqName=productSelect&id=${u.id }&pageNo=1">${u.kind }</a></li>
                    </c:if>
                        
                    </c:forEach>
                </c:otherwise>
                </c:choose>
                    
                </ul>
            </li>
        </ul>
    </aside>

    <aside class="pro-rightsidebar">
        <header>

                    <p></p>
            <span>
            <c:if test="${id==0 }">全部</c:if>
            <c:if test="${id!=0 }">${productClass[id-1].kind }</c:if>
            </span>
        </header>
        <ul>
        <c:choose>
        <c:when test="${empty product }"></c:when>
        <c:otherwise>
            <c:forEach items="${product }" var="u">
            <li >
                <a href="ProductServlet?reqName=productdetails&id=${u.id }&classId=${u.classId}">
                <div class="img-box">
                    <img src="${u.picture }">
                    <p>${u.name }</p>
                </div>
                </a>
            </li>
            </c:forEach>
        </c:otherwise>
        </c:choose>
        
        </ul>
		
    </aside>


</section>
    <header class="header-article-list">
        <ul>
            <li>
                          总共【${totalPage}】页 &nbsp;&nbsp;${pageNo}/${totalPage}&nbsp;&nbsp; <a href="ProductServlet?reqName=productSelect&id=${id }&pageNo=1">首页</a> 
            </li>
            <li>
            <c:choose>
            <c:when test="${pageNo > 1}">
                        <a href="ProductServlet?reqName=productSelect&id=${id }&pageNo=${pageNo-1}">上一页</a>
                    </c:when>
                    <c:otherwise>
                        上一页
                    </c:otherwise>
                </c:choose>
            </li>
            <li>
                <c:choose>
                    <c:when test="${pageNo < totalPage}">
                        <a href="ProductServlet?reqName=productSelect&id=${id }&pageNo=${pageNo+1}">下一页</a>
                    </c:when>
                    <c:otherwise>
                        下一页
                    </c:otherwise>
                </c:choose>
            </li>
            <li>
                  <a href="ProductServlet?reqName=productSelect&id=${id }&pageNo=${totalPage}">尾页</a>
            </li>
        
        </ul>
    </header>

<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>